<%@ taglib uri="http://www.springframework.org/tags" prefix="spring" %>
<style>
	.dialog .form-element {
		margin-bottom: 2px;
	}

	.dialog .form-element > label {
		float: left;
		width: 180px;
	}
	
	.dialog .form-field {
		margin-left: 200px;
	}	
	
	.dialog input[type="password"] {
		width: 150px;
	}
</style>

<form id="passwordForm" class="form dialog" method="post" action="save">

	<p class="validateTips">Campos marcados com um asterisco s&atilde;o obrigat&oacute;rios.</p>

	<div class="form-element">
		<label><spring:message code="currentPassword" /><span class="required">*</span></label>
        
		<div class="form-field">
			<div class="form-field-wrap">
				<input type="password" name="currentPassword" id="currentPassword" minlength="4" maxlength="16" required="true" />
			</div>
		</div>
        
		<div class="clear"></div>
	</div>
	
	<div class="form-element">
		<label><spring:message code="newPassword" /><span class="required">*</span></label>
        
		<div class="form-field">
			<div class="form-field-wrap">
				<input type="password" name="newPassword" id="newPassword" minlength="4" maxlength="16" required="true" />
			</div>
		</div>
        
		<div class="clear"></div>
	</div>
	
	<div class="form-element">
		<label><spring:message code="passwordConfirmation" /><span class="required">*</span></label>
        
		<div class="form-field">
			<div class="form-field-wrap">
				<input type="password" name="passwordConfirmation" id="passwordConfirmation" minlength="4" maxlength="16" required="true" equalTo="#newPassword" />
			</div>
		</div>
        
		<div class="clear"></div>
	</div>
	
</form>

<script type="text/javascript">
	$(document).ready(function() {
		$("#passwordForm").tooltip({
			position: { my: "left top+6", at: "left bottom", collision: "flipfit" },
			show: false,
			hide: false
		});
		
        $("#passwordForm").validate();
	});
</script>